package com.changzhi.common.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;

/**
 * 元旦奖品类型
 * 
 * @author lxw
 *
 */
public enum InvitePrizeSourceEnum implements IEnum<Integer> {

	GIFT(0, "礼物"),
	DRESS_UP(1, "装扮"),
	DECORATE(2, "装饰物"),
	DIAMOND(3, "钻石"),
	COIN(4, "友情币"),
	SKIN(5, "王者皮肤");

	private Integer value;
	private String desc;

	InvitePrizeSourceEnum(final Integer value, final String desc) {
		this.value = value;
		this.desc = desc;
	}

	@Override
	public Integer getValue() {
		return this.value;
	}

	public String getDesc() {
		return this.desc;
	}


	public static InvitePrizeSourceEnum getEnum(Integer type){
		if(type == null){
			return null;
		}
		for (InvitePrizeSourceEnum anEnum : InvitePrizeSourceEnum.values()) {
			if(type.equals(anEnum.getValue())){
				return anEnum;
			}
		}
		return null;
	}
}
